package com.acceptable.qucun.file.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 巴斯罗斯·K·赫斯洛利
 * @since 2021-08-29
 */
@TableName("file_source")
public class FileSource extends Model<FileSource> {

    private static final long serialVersionUID=1L;

    /**
     * 文件号
     */
    @TableField(value = "file_id")
    private Long fileId;

    /**
     *  文件Md5
     */
    @TableField(value = "file_md5")
    private String fileMd5;

    /**
     * 外键 参照user表的uid
     */
    @TableField("user_id")
    private Integer userId;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer uid) {
        this.userId = uid;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }

    public String getFileMd5() {
        return fileMd5;
    }

    public void setFileMd5(String fileMd5) {
        this.fileMd5 = fileMd5;
    }

    @Override
    protected Serializable pkVal() {
        return this.fileId;
    }

    @Override
    public String toString() {
        return "TemplateFile{" +
                "fileId=" + fileId +
                ", userId=" + userId +
                '}';
    }
}
